export default {
    // 总数量
    totalSize(state){
      return state.todos.length;
    },
    // 完成的数量
    completeSize(state){
      return state.todos.reduce((pre,rodo)=>pre + (todo.completed ? 1 : 0),0)
    },
    // 是否全部完成
    isCompleteAll(state,getters){
      return state.todos.length === getter.completeSize && getters.completeSize > 0
    }
}